﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Web.Mvc;
using System.Web.Security;

namespace Irandeb4.Models
{

    public class ChangePasswordModel
    {
        [Required(ErrorMessage = "El password actual es requerido.")]
        [DataType(DataType.Password)]
        [Display(Name = "Password actual")]
        public string OldPassword { get; set; }

        [Required(ErrorMessage = "El nuevo password es requerido.")]
        [StringLength(100, ErrorMessage = "el {0} debe ser al menos {2} caracteres.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Nuevo password")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirmar el nuevo password")]
        [Compare("NewPassword", ErrorMessage = "El nuevo password y la confirmacion del password no coinciden")]
        public string ConfirmPassword { get; set; }
    }

    public class LogOnModel
    {
        [Required(ErrorMessage="El nombre de usuario es requerido.")]
        [Display(Name = "Nombre Usuario")]
        public string UserName { get; set; }

        [Required(ErrorMessage="El password es requerido.")]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [Display(Name = "Recordarme?")]
        public bool RememberMe { get; set; }
    }

}
